package com.clf.springBoot.modules.test.entity;

import com.clf.springBoot.modules.common.entity.AbstractEntity;

import javax.persistence.*;
import java.util.List;

@Entity
@Table(name = "test_school")
public class School extends AbstractEntity {

    private String schoolName;

    @OneToMany(mappedBy = "school", cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    private List<Clazz> clazzs;

    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    public List<Clazz> getClazzs() {
        return clazzs;
    }

    public void setClazzs(List<Clazz> clazzs) {
        this.clazzs = clazzs;
    }
}